<?php

namespace App\Http\Requests\Api;

use Illuminate\Foundation\Http\FormRequest;

class WithdrawRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'total_amount' => 'required|numeric|between:500,100000',
        ];
    }

    public function messages()
    {
        return [
            'total_amount.required' => '请输入金额',
            'total_amount.numeric' => '金额必须是数字',
            'total_amount.between' => '提现金额必须在500元至10w元之间',
        ];
    }
}
